Skip to content

Document keybind implementation architecture#5218

Closed
Copilot wants to merge 3 commits intodevfrom
copilot/implement-keybinds-feature
Closed

Document keybind implementation architecture#5218
Copilot wants to merge 3 commits intodevfrom
copilot/implement-keybinds-feature

Conversation

Copy link
Contributor

Copilot AI commented Dec 8, 2025

The codebase lacked documentation on keybind implementation locations and architecture. This adds comprehensive technical documentation.

Changes

  • KEYBINDS.md: Documents the three-layer keybind architecture

    • Utility layer (src/util/keybind.ts): Parsing/matching logic for keybind strings
    • Context layer (src/cli/cmd/tui/context/keybind.tsx): Solid.js provider with leader key state management
    • Configuration layer (src/config/config.ts): Zod schema defining 40+ configurable keybinds
  • Includes architecture diagram, usage patterns, all available keybinds with defaults, and guide for adding new keybinds

  • README.md: Added reference link to documentation

Example usage pattern documented:

import { useKeybind } from "@tui/context/keybind"

const keybind = useKeybind()

// Match keyboard events
if (keybind.match("app_exit", event)) {
  // handle exit
}

// Display to user
const exitKey = keybind.print("app_exit") // "ctrl+c"
Original prompt

where are keybinds implemented?


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits December 8, 2025 01:37
Co-authored-by: thdxr <826656+thdxr@users.noreply.github.com>
Co-authored-by: thdxr <826656+thdxr@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement keybinds functionality Document keybind implementation architecture Dec 8, 2025
Copilot AI requested a review from thdxr December 8, 2025 01:40
@thdxr thdxr force-pushed the dev branch 3 times, most recently from f1ae801 to 08fa7f7 Compare January 30, 2026 14:37
@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR.

@github-actions github-actions bot closed this Feb 6, 2026
@thdxr thdxr deleted the copilot/implement-keybinds-feature branch February 7, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants